
import {DECREASE,INCREASE} from './reducers-type'

export function countor(state=0, action){
    switch(action.type){
        case INCREASE:
            return state*1 + action.data*1;
        case DECREASE:
            return state*1 - action.data*1;
        default:
            return state;
    }
}